找传奇、传世资源到传世资源站!

C#窗体移动图片例子

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

C# 像网页图片滚动一样的动画效果

public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { this.timer1.Enabled = true; //计时器可用 } private void timer1_Tick(object sender, EventArgs e) { this.panel1.Left = this.panel1.Left 10; if (this.panel1.Left > this.Width 10) { this.panel1.Left = - this.panel1.Width; } } private void pictureBox1_MouseEnter(object sender, EventArgs e) { timer1.Enabled = false; } private void pictureBox1_MouseLeave(object sender, EventArgs e) { timer1.Enabled = true; } private void pictureBox2_MouseLeave(object sender, EventArgs e) { timer1.Enabled = true; } private void pictureBox2_MouseEnter(object sender, EventArgs e) { timer1.Enabled = false; } private void pictureBox3_MouseEnter(object sender, EventArgs e) { timer1.Enabled = false; } private void pictureBox3_MouseLeave(object sender, EventArgs e) { timer1.Enabled = true; } }

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复